package com.hzlj.position.locate.common.enums;

import com.fz.common.base.exception.PubError;
import com.fz.common.base.exception.PubException;
import lombok.Getter;

/**
 * @author lifh
 * @date 2021/11/9 上午11:59
 **/
@Getter
public enum AbnMissingStep {
    STEP1("step1", "通知矫正人员"),
    STEP2("step2", "通知家属"),
    STEP3("step3", "通知工作人员(上报结果)"),
    ;

    private final String step;
    private final String stepText;

    AbnMissingStep(String step, String stepText) {
        this.step = step;
        this.stepText = stepText;
    }

    public static AbnMissingStep of(String step) {
        for (AbnMissingStep statusEnum : values()) {
            if (statusEnum.step.equalsIgnoreCase(step)) {
                return statusEnum;
            }
        }
        throw new PubException(PubError.PARAM_EMPTY_ERROR);
    }
}
